/**
 * 显示弹窗
 * @param {String} title 标题
 * @param { "success" | "loading" | "erroe" | "fail" } icon 图标，默认seccess
 * @param {number} duration 延迟时间，默认2s，单位秒
 */
const toast = (title, icon = "success", duration = 2) => {
  duration = duration * 1000
  uni.showToast({
    title: title,
    icon: icon,
    duration: duration
  })
}

export default toast;